
/**
 *
 *	KWQL Query Builder 
 * 
 * 	diploma thesis work by Andreas Hartl, 2009
 * 	
 */ 


 
/**
 * This is the localization file for the KWQL Query Builder
 * All Strings that will be shown to the user in it's interface are defined here
 * To support different languages in KQB, simply translate the strings in this file
 * and link the translated file in KQB.html
 * 
 * Note that changes here might require changes in KQB.css, e.g. if node names in the new
 * language become too long to be displayed, width of nodes should be increased in the css
 */


var KQBStrings = {};


/**
 * Misc Strings
 */

KQBStrings.Misc = {};

KQBStrings.Misc.NodeResizeTooltip = "This node can have multiple children. Click here to expand/shrink this node.";




/**
 * NodeNames
 * 
 * this section contains the names of the various KQB nodes,
 * as they will be displayed in the node labels 
 */

KQBStrings.NodeNames = {};

KQBStrings.NodeNames.Test = "Test";
KQBStrings.NodeNames.ContentItem = "ContentItem";
KQBStrings.NodeNames.AND = "AND";
KQBStrings.NodeNames.OR = "OR";
KQBStrings.NodeNames.NOT = "NOT";
KQBStrings.NodeNames.OPTIONAL = "Optional";
KQBStrings.NodeNames.Keyword = "Value";
KQBStrings.NodeNames.Variable = "Variable";
KQBStrings.NodeNames.Rule = "Rule";
KQBStrings.NodeNames.Compound = "Compound";
KQBStrings.NodeNames.Author = "Author";
KQBStrings.NodeNames.Created = "Created";
KQBStrings.NodeNames.LastEdited = "LastEdited";
KQBStrings.NodeNames.Tag = "Tag";
KQBStrings.NodeNames.Title = "Title";
KQBStrings.NodeNames.Text = "Text";
KQBStrings.NodeNames.NumberEdits = "NumberEdits";
KQBStrings.NodeNames.Link = "Link";
KQBStrings.NodeNames.Fragment = "Fragment";
KQBStrings.NodeNames.Descendant = "Descendant";
KQBStrings.NodeNames.Child = "Child";
KQBStrings.NodeNames.Target = "Target";
KQBStrings.NodeNames.Origin = "Origin";
KQBStrings.NodeNames.AnchorText = "Anchor Text";
KQBStrings.NodeNames.Name = "Name";
KQBStrings.NodeNames.ALL = "All";
KQBStrings.NodeNames.SOME = "Some";
KQBStrings.NodeNames.AVG = "Average";
KQBStrings.NodeNames.COUNT = "Count"
KQBStrings.NodeNames.URI = "URI";
KQBStrings.NodeNames.Disagree = "Disagree";
KQBStrings.NodeNames.Agree = "Agree";
KQBStrings.NodeNames.SPARQL = "SPARQL";
KQBStrings.NodeNames.Binding = "Binding";
KQBStrings.NodeNames.TagGrouping = "Grouping";
KQBStrings.NodeNames.TagCharacterization = "Characterization";


/**
 * Tooltips
 * 
 * this section contains the tooltips for the specific elements
 */

KQBStrings.ToolTips = {};

KQBStrings.ToolTips.Test = "Test";
KQBStrings.ToolTips.ContentItem = "A Content Item represents a Wiki page";
KQBStrings.ToolTips.AND = "Put multiple elements in an AND box if they all must be true";
KQBStrings.ToolTips.OR = "Put multiple elements in an OR box if it is enough for one of them to be true";
KQBStrings.ToolTips.NOT = "A NOT box negates the value of its child. Put something in a NOT box if You don't want it to exist in the result";
KQBStrings.ToolTips.OPTIONAL = "An OPTIONAL box allows the binding of values to variables only when they exist. The first child of the OPTIONAL box is its default value. The Second child child must be a qualifier with a variable child, that will only be bound when the qualifier has a value";
KQBStrings.ToolTips.Keyword = "A Value box represents a single value or a string";
KQBStrings.ToolTips.Variable = "A Variable box can be used to assign a name to its parent box.";
KQBStrings.ToolTips.Rule = "A Rule can be used to transform Content Items. It must have two children. The first child specifies a new Construction, the second one a Query";
KQBStrings.ToolTips.Compound = "A Compound box can be used in the construction part of a Rule instead of a Value box to construct complex strings";
KQBStrings.ToolTips.Author = "An Author box specifies the author of the containing element. This can be a child of Content Item, Tag or Fragment";
KQBStrings.ToolTips.Created = "A Created box specifies the creation date of the containing element. This can be a child of Content Item, Tag or Fragment";
KQBStrings.ToolTips.LastEdited = "A Last Edited box specifies the date of last edit of the containing element. This can be a child of Content Item";
KQBStrings.ToolTips.Tag = "A Tag box specifies a value that the containing element has been tagged with. This can be a child of Content Item, Link or Fragment";
KQBStrings.ToolTips.Title = "A Title box represents the title of a Content Item";
KQBStrings.ToolTips.Text = "A Text box represents the text in a Content Item";
KQBStrings.ToolTips.NumberEdits = "A Number Edits box represents the number of edits a Content Item has received";
KQBStrings.ToolTips.Link = "A Link box represents a link from one Content Item to another, similar to Hyperlinks on Websites";
KQBStrings.ToolTips.Fragment = "A Fragment box represents a piece of text within one or more Content Items";
KQBStrings.ToolTips.Descendant = "A Descendant box represents the descendants within a hierarchy of Content Items or Fragments";
KQBStrings.ToolTips.Child = "A Child box represents a direct child within a hierarchy of Content Items or Fragments";
KQBStrings.ToolTips.Target = "A Target box represents the target Content Item of a Link";
KQBStrings.ToolTips.Origin = "An Origin box represents the source Content Item of a Link";
KQBStrings.ToolTips.AnchorText = "An Anchor Text box represents the text of a Link";
KQBStrings.ToolTips.Name = "A Name box represents the name, or value, of a Tag";
KQBStrings.ToolTips.ALL = "The ALL box is an operator that returns all the values that its first child, a Variable, has. Its second child is a Value box that allows to specify a character, e.g. a comma, with which the values of the Variable will be separated";
KQBStrings.ToolTips.COUNT = "The Count operator returns the number of instances of its Variable child that are found";
KQBStrings.ToolTips.AVG = "The AVG operator returns the average of the values of its child (typically a Variable)";
KQBStrings.ToolTips.SOME = "The SOME operator will return the number (specified in its first child) of values from the Variable that is its second child. The third child is a separator character";
KQBStrings.ToolTips.URI = "An URI box represents the unique resource identifier of a Content Item or Fragment";
KQBStrings.ToolTips.Disagree = "A Disagree box represents the names of the users who do not agree with a content item's content";
KQBStrings.ToolTips.Disagree = "A Disagree box represents the names of the users who do agree with a content item's content";
KQBStrings.ToolTips.SPARQL = "A SPARQL box may contain SPARQL code. This box must exist outside of any resources";
KQBStrings.ToolTips.Binding = "This box combines a selection constraint and a variable binding. The first child holds the name of the variable to bind to, the second child holds the text the parent item must contain";
KQBStrings.ToolTips.TagGrouping = "A Grouping box represents a grouping within a structured Tag. It can contain tag names or tag characterizations, and must be a child of the 'name' box of a tag";
KQBStrings.ToolTips.TagCharacterization = "A Tag Characterization box represents a named tag. The first child is the tag name, the second child can be a tag value or a tag grouping. The tag characterization box must be a child of the 'name' box of a tag";


/**
 *  This section contnains the tooltips that will be displayed when a node has an error or warning
 */
KQBStrings.ToolTips.NotAllowedAsChild = "This box can not be dropped and added as a child here";
KQBStrings.ToolTips.AllowedAsChild = "Drop this box here to add as a child of ";
KQBStrings.ToolTips.AllowedAsChildInOtherPos = "Drop this box on a free position within this box to add as a child";
KQBStrings.ToolTips.NotAllowedToSwitch = "This box can not be dropped here";
KQBStrings.ToolTips.AllowedToSwitch = "Drop this box here to switch types";

KQBStrings.ToolTips.ErrorEmptyText = "This box contains an empty text field";
KQBStrings.ToolTips.ErrorMisplacedOptional = "This box is currently within the construct part of a rule, but must only exist in the query part";
KQBStrings.ToolTips.ErrorMisplacedAll = "This box is currently within the query part of a rule, but must only exist in the construct part";
KQBStrings.ToolTips.ErrorMisplacedSome = "This box is currently within the query part of a rule, but must only exist in the construct part";
KQBStrings.ToolTips.ErrorMisplacedAvg = "This box is currently within the query part of a rule, but must only exist in the construct part";
KQBStrings.ToolTips.ErrorMisplacedCount = "This box is currently within the query part of a rule, but must only exist in the construct part";
KQBStrings.ToolTips.ErrorUndefVar = "This variable is not defined in the query part of the rule";
KQBStrings.ToolTips.NeedTwoChildren = "This box must have two children";
KQBStrings.ToolTips.InvalidChild = " is not a valid qualifier for a ";
KQBStrings.ToolTips.SingularChild = "This box must only occur once within its parent";

// This tooltip will be displayed when a node is dragged outside the workspace
KQBStrings.ToolTips.DeleteNode = "Drop this box now to delete it";


/**
 * Hints
 * 
 * this section contains the possible hints that will be displayed
 */

KQBStrings.Hints = {};

KQBStrings.Hints.Start = "Welcome to the KWQL Query Builder. Start by selecting an element in the menu and adding child elements to it. Drop items outside the colored workarea to delete them.";
KQBStrings.Hints.InvalidVariableName = "Variables must only contain the letters of the alphabet, numbers or the underscore";
KQBStrings.Hints.InvalidKeywordName = "Values may only contain the letters of the alphabet, and a few special characters. Spaces are also allowed, but only if the whole value is put into quotes";
KQBStrings.Hints.EmptyText = "Please enter some text into the empty textbox";
KQBStrings.Hints.ANDWithOneChild = "The marked AND box contains only one child and is being ignored in the KWQL output";
KQBStrings.Hints.ORWithOneChild = "The marked OR box contains only one child and is being ignored in the KWQL output";
KQBStrings.Hints.EmptyLeaf = "There is an empty box in your query that is currently being ignored in the KWQL output. You should add a childbox to it";
KQBStrings.Hints.NonNumber = "Please enter a valid number in the marked 'num' child of the 'SOME' box";
KQBStrings.Hints.UnplacedOptional = "The marked OPTIONAL box is currently ignored in the KWQL output. OPTIONAL boxs can only occur in the query part of a rule";
KQBStrings.Hints.MisplacedOptional = "The marked OPTIONAL box is in the construct part of a rule, but OPTIONAL boxs may only occur in the query part of a rule. Please remove it or put it within the second child of the rule";
KQBStrings.Hints.RuleWithOneChild = "The marked Rule contains only one child and is being ignored in the KWQL output";
KQBStrings.Hints.UnplacedAll = "The marked ALL box is currently ignored in the KWQL output. ALL boxs can only occur in the construct part of a rule";
KQBStrings.Hints.UnplacedSome = "The marked SOME box is currently ignored in the KWQL output. SOME boxs can only occur in the construct part of a rule";
KQBStrings.Hints.MisplacedAll = "The marked ALL box is in the query part of a rule, but ALL boxs may only occur in the construct part of a rule. Please remove it or put it within the first child of the rule";
KQBStrings.Hints.MisplacedSome = "The marked SOME box is in the query part of a rule, but SOME boxs may only occur in the construct part of a rule. Please remove it or put it within the first child of the rule";
KQBStrings.Hints.UndefVar = "A variable must be defined in the query part of a rule to be used in the construct part. Make sure to have a variable with the same name in the rule's other child";
KQBStrings.Hints.MisplacedAvg = "The marked AVG box is in the query part of a rule, but AVG boxs may only occur in the construct part of a rule. Please remove it or put it within the first child of the rule";
KQBStrings.Hints.MisplacedCount = "The marked COUNT box is in the query part of a rule, but COUNT boxs may only occur in the construct part of a rule. Please remove it or put it within the first child of the rule";
KQBStrings.Hints.NeedTwoChildren = "The marked Tag Characterization box needs two children. Please add another child box (a value or tag grouping)";
KQBStrings.Hints.OptionalNotEnoughChildren = "The marked OPTIONAL box needs to have two children";
KQBStrings.Hints.InvalidChild = "The marked box can not be a child of the box it is contained in";
KQBStrings.Hints.VarWithoutCorrectParent = "The marked Variable box has an invalid parent and is currently ignored in the KWQL output. Add it as a child of a Qualifier, a Rule or a Compound box";
KQBStrings.Hints.SingularChild = "The marked qualifier occurs multiple times, but it must be unique within the resource if not part of an OR. Please remove all but one occurences";


/**
 * Warnings
 * 
 * this section contains the possible warnings that will be displayed
 */

KQBStrings.Warnings = {};

KQBStrings.Warnings.WorkspaceEmpty = "The workspace is empty";
KQBStrings.Warnings.ANDWithOneChild = "This box contains only one child";
KQBStrings.Warnings.ORWithOneChild = "This box contains only one child";
KQBStrings.Warnings.WarningInChild = "A child element contains a warning";
KQBStrings.Warnings.EmptyLeaf = "This box is empty";
KQBStrings.Warnings.UnplacedOptional = "This box can only occur in the query part of a rule";
KQBStrings.Warnings.RuleWithOneChild = "This box contains only one child";
KQBStrings.Warnings.UnplacedAll = "This box can only occur in the construct part of a rule";
KQBStrings.Warnings.UnplacedSome = "This box can only occur in the construct part of a rule";
KQBStrings.Warnings.UnplacedAvg = "This box can only occur in the construct part of a rule";
KQBStrings.Warnings.UnplacedCount = "This box can only occur in the construct part of a rule";
KQBStrings.Warnings.OptionalNotEnoughChildren = "This box has not enough children";
KQBStrings.Warnings.VarWithoutCorrectParent = "This box has an invalid parent";


/**
 * Errors
 *
 * this section contains the possible errors that will be displayed
 */
KQBStrings.Errors = {};

KQBStrings.Errors.ErrorInChild = "A childbox contains an error";
KQBStrings.Errors.InvalidVariableName = " is not a valid variable name";
KQBStrings.Errors.InvalidKeywordName = " is not a valid value";
KQBStrings.Errors.EmptyText = "An element contains empty text";
KQBStrings.Errors.NonNumber = " is not a number";
KQBStrings.Errors.MisplacedOptional = "An OPTIONAL box is misplaced";
KQBStrings.Errors.MisplacedAll = "An ALL box is misplaced";
KQBStrings.Errors.MisplacedSome = "A SOME box is misplaced";
KQBStrings.Errors.MisplacedAvg = "An AVG box is misplaced";
KQBStrings.Errors.MisplacedCount = "A COUNT box is misplaced";
KQBStrings.Errors.UndefVar = " is used in the construct part of a rule without being defined in the query";
KQBStrings.Errors.NeedTwoChildren = "A box that must have two children only has one";
KQBStrings.Errors.InvalidChild = "A resource has an invalid qualifier";
KQBStrings.Errors.SingularChild = "A singular qualifier occurs multiple times";


KQBStrings.Parser = {};

KQBStrings.Parser.WarningUnknownChar = "skipped unrecognized character: ";


/**
 * KiWiIntegration
 *
 * this section contains strings used in the part of the KQB responsible for
 * saving and loading queries to KiWi
 */

KQBStrings.KiWiIntegration = {};

KQBStrings.KiWiIntegration.NoConn = "Error: No Connection to Server";
KQBStrings.KiWiIntegration.NoLogin = "Not logged in";
KQBStrings.KiWiIntegration.NoConnShort = "No Server Connection";
KQBStrings.KiWiIntegration.NoQuery = "Error: No Query selected";
KQBStrings.KiWiIntegration.NoValidQuery = "Error: No valid Query selected";
KQBStrings.KiWiIntegration.ErrorQuery = "You can only save correct queries. The current query contains an error";
KQBStrings.KiWiIntegration.EnterName = "Please enter a name for the query:";
KQBStrings.KiWiIntegration.QueryExists = "A query with that name already exists. Overwrite?";
KQBStrings.KiWiIntegration.ConfirmDelete = "Are You sure You want to delete the following query:\r\n";
